<?php get_header() ?>
<?php 
$catslideshow = 2; 
$catdoctor = 80;
$catmidbanner = 81;
$catvideo = 82;
$catblock = 83;
?>

<div class="main">
    <div class="slide-home">
        <div class="container">
            <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
                <!-- Wrapper for slides -->
                <div class="carousel-inner">
                    <?php
                    wp_reset_query(); $k = 0 ; 
                    query_posts(array('cat' => $catslideshow));
                    while (have_posts()): the_post();
                        ?>
                        <div class="item <?php echo !$k++ ? 'active' : ''  ?>">
                            <a href="<?php the_permalink() ?>">
                                <?php the_post_thumbnail(array(980, 432), array('class' => 'img-thumbnail')) ?>
                            </a>
                            <div class="subdesc">
                                <h2><?php the_title() ?></h2>
                                <?php the_excerpt() ?>
                                <p class="viewmore"><a href="<?php the_permalink() ?>">Xem thêm</a></p>
                            </div>  
                        </div>
                    <?php endwhile; ?>

                </div>

                <!-- Controls -->
                <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                    <span class="glyphicon slide-left"></span>
                </a>
                <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                    <span class="glyphicon slide-right"></span>
                </a>
            </div>
        </div>
    </div>
    <div class="content-home">
        <div class="container">
            <div class="left">
                <?php wp_nav_menu(array('menu_class' => 'category', 'menu' => 'LeftSidebar', 'depth' => 3,'container' => 'none')); ?>
            </div>
            <div class="center">
                <div class="gallery">
                    <h4>Thư viện ảnh</h4>
                    <div class="corner"></div>
                    <div class="mcon img-thumbnail">
                        <?php echo do_shortcode('[Best_Wordpress_Gallery gallery_type="slideshow" theme_id="2" gallery_id="1" sort_by="order" slideshow_effect="fade" slideshow_interval="5" slideshow_width="470" slideshow_height="313" enable_slideshow_autoplay="1" enable_slideshow_shuffle="1" enable_slideshow_ctrl="1" enable_slideshow_filmstrip="1" slideshow_filmstrip_height="70" slideshow_enable_title="0" slideshow_title_position="top-right" slideshow_enable_description="0" slideshow_description_position="bottom-right" enable_slideshow_music="0" slideshow_music_url="0" watermark_type="none" watermark_link="0"]'); ?>
                    </div>
                </div>
                <?php
                wp_reset_query(); $k = 0 ; 
                query_posts(array('cat' => $catblock, 'posts_per_page' => 2));
                while (have_posts()): the_post(); $k++;
                    ?>
                <div class="box <?php if($k%2==1) echo 'green'; else echo 'blue';  ?>">
                    <div class="head"><a href="<?php the_permalink() ?>"><?php the_title() ?></a></div>
                    <div class="body">
                        <?php the_excerpt() ?>
                    </div>
                    <div class="foot"></div>
                </div>
                <?php endwhile; ?>
            </div>
            <div class="right">
                <div class="block intro">
                    <a href="<?php echo site_url() ?>/gioi-thieu-ve-bac-si-vien-truong"><img src="<?php echo bloginfo('template_url'); ?>/img/intro.png"></a>
                </div>
                <div class="block support">
                    <a href="ymsgr:sendim?hoatuyet_py"><img src='http://opi.yahoo.com/online?u=hoatuyet_py&m=g&t=5'/></a>
                    <a href="ymsgr:sendim?dothidiaoc"><img src='http://opi.yahoo.com/online?u=dothidiaoc&m=g&t=5'/></a>
                    <p>0909 333 777<br/>08 22 19 19 19</p>
                </div>
                <div class="block video">
                    <h4>Video</h4>
                    <div class="corner"><a href="<?php echo get_cat_slug($catvideo) ?>">Clip khác</a></div>
                    <div class="mcon">
                        <iframe width="200" height="147" src="//www.youtube.com/embed/8tNDM-IsFcc" frameborder="0" allowfullscreen></iframe>
                        <a href="<?php echo get_cat_slug($catvideo) ?>">Sức khỏe của bạn</a>
                        <ul class="child">
                            <?php
                            wp_reset_query(); $k = 0 ; 
                            query_posts(array('cat' => $catvideo, 'posts_per_page' => 3));
                            while (have_posts()): the_post(); $k++;
                                ?>
                            <li><a href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
                            <?php endwhile; ?>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="content-item">
        <div class="container">
            <?php
            wp_reset_query(); $k = 0 ; 
            query_posts(array('cat' => $catmidbanner, 'posts_per_page' => 5));
            while (have_posts()): the_post(); $k++;
                ?>
            <a href="<?php the_permalink() ?>" class="item-<?php echo $k; ?>">
            <?php the_post_thumbnail() ?>
            </a>
            <?php endwhile; ?>
        </div>
    </div>
    <div class="content-certify">
        <div class="container">
            <div class="left">
                <div class="team">
                    <h4>Bàn tay vàng</h4>
                    <div class="quote">Phụ trách chuyên môn bởi bác sĩ đạt danh hiệu <span>Bàn Tay Vàng</span> trong ngành thẩm mỹ và chăm sóc sắc đẹp</div>
                    <div class="mcon">
                        <?php
                        wp_reset_query(); $k = 0 ; 
                        query_posts(array('cat' => $catdoctor));
                        while (have_posts()): the_post(); $k++;
                            ?>
                            <article class="team-<?php echo $k%4+1; ?>">
                            <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(array(100, 100)) ?></a>
                            <p>
                                <a href="<?php the_permalink() ?>"><?php the_title() ?></a>
                                <span><?php the_excerpt() ?></span>
                            </p>
                        </article>
                        <?php endwhile; ?>
                    </div>
                </div>
            </div>
            <div class="right">
                <div class="block certify">
                    <div class="head">Bằng cấp</div>
                    <div class="body">
                        <a href="<?php echo bloginfo('template_url'); ?>/img/certify.png" class="fancybox"><img src="<?php echo bloginfo('template_url'); ?>/img/certify.png"></a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $('.fancybox').fancybox();
</script>

<?php get_footer() ?>

